예제 #1
0
def product_pic_new(com_id, product_id, pic):
    pic_id = pic_new(CID_PRODUCT_PIC, com_id)
    pic_save(pic_id, pic)

    p1 = pic_fit_width_cut_height_if_large(pic, 548)
    fs_set_jpg('548', pic_id, p1)

    p2 = pic_fit_width_cut_height_if_large(pic, 215)
    fs_set_jpg('215', pic_id, p2)
    return pic_id
예제 #2
0
def product_pic_new(com_id, product_id, pic):
    pic_id = pic_new(CID_PRODUCT_PIC, com_id)
    pic_save(pic_id, pic)

    p1 = pic_fit_width_cut_height_if_large(pic, 548)
    fs_set_jpg('548', pic_id, p1)

    p2 = pic_fit_width_cut_height_if_large(pic, 215)
    fs_set_jpg('215', pic_id, p2)
    return pic_id
예제 #3
0
def po_pic_new(user_id, po_id, pic, seq=None):
    pic_id = pic_new(CID_PO_PIC, user_id)
    pic_save(pic_id, pic)
    try:
        po_pic_save(pic_id, pic)
    except:
        traceback.print_exc()
        return

    if seq is None:
        seq = seq_gen(user_id, po_id)
    pp = PoPic(id=pic_id, user_id=user_id, po_id=po_id, seq=seq)
    pp.save()
    mc_flush(user_id, po_id)
    return pp
예제 #4
0
def po_pic_new(user_id, po_id, pic, seq=None):
    pic_id = pic_new(CID_PO_PIC, user_id)
    pic_save(pic_id, pic)
    try:
        po_pic_save(pic_id, pic)
    except:
        traceback.print_exc()
        return

    if seq is None:
        seq = seq_gen(user_id, po_id)
    pp = PoPic(id=pic_id, user_id=user_id, po_id=po_id, seq=seq)
    pp.save()
    mc_flush(user_id, po_id)
    return pp
예제 #5
0
def photo_new(user_id, photo):
    photo_id = pic_new(CID_PHOTO, user_id)
    pic_save(photo_id, photo)
    po_photo_save(photo_id, photo)
    return photo_id
예제 #6
0
def photo_new(user_id, photo):
    photo_id = pic_new(CID_PHOTO, user_id)
    pic_save(photo_id, photo)
    po_photo_save(photo_id, photo)
    return photo_id
예제 #7
0
def com_pic_new(com_id, pic):
    pic_id = pic_new(CID_COM_PIC, com_id)
    pic_save(pic_id, pic)
    p1 = pic_fit_width_cut_height_if_large(pic, 357)
    fs_set_jpg('357', pic_id, p1)
    return pic_id
예제 #8
0
def com_pic_new(com_id, pic):
    pic_id = pic_new(CID_COM_PIC, com_id)
    pic_save(pic_id, pic)
    p1 = pic_fit_width_cut_height_if_large(pic, 357)
    fs_set_jpg('357', pic_id, p1)
    return pic_id