瀏覽代碼

积分商城

xiongzhu 7 年之前
父節點
當前提交
629d91e2ff

+ 6 - 2
src/main/java/com/thmodel/dao/IntegralDao.java

@@ -2,12 +2,14 @@ package com.thmodel.dao;
 
 import com.thmodel.entity.ExchangeInfo;
 import com.thmodel.entity.MerchandiseInfo;
-import com.thmodel.jooq.tables.records.ExchangeinfoRecord;
+import com.thmodel.jooq.tables.records.MerchandiseinfoRecord;
 import net.sf.json.JSONObject;
 
 import java.util.List;
 
 public interface IntegralDao {
+    MerchandiseInfo queryMerchandiseInfo(int id);
+
     List<JSONObject> queryMerchandisesByPage(MerchandiseInfo record, int page);
 
     List<JSONObject> queryExchangeInfoByPage(ExchangeInfo record, int page);
@@ -16,5 +18,7 @@ public interface IntegralDao {
 
     List<JSONObject> queryAllExchangeInfo(ExchangeInfo record);
 
-    int saveExchangeInfo(ExchangeinfoRecord record);
+    int saveExchangeInfo(ExchangeInfo record);
+
+    int updateMerchandiseInfo(MerchandiseinfoRecord record);
 }

+ 351 - 348
src/main/java/com/thmodel/dao/MemberinfoDao.java

@@ -1,348 +1,351 @@
-package com.thmodel.dao;
-
-import java.util.List;
-import java.util.Map;
-
-import com.thmodel.entity.MemberInfo;
-import com.thmodel.entity.Nexus;
-import com.thmodel.entity.ReportInfo;
-import com.thmodel.page.Page;
-import net.sf.json.JSONObject;
-import org.jooq.Record;
-
-import javax.servlet.http.HttpServletRequest;
-
-public interface MemberinfoDao {
-
-    /**
-     * 客户端注册
-     * 插入会员账号信息表
-     *
-     * @param memberinfo
-     * @return
-     */
-    public int insertMemberinfoByRegister(MemberInfo memberinfo, String qrcode, HttpServletRequest request);
-
-    /**
-     * 模特端注册
-     * 插入会员账号信息表
-     *
-     * @param memberinfo
-     * @return
-     */
-    public int insertMemberinfoByModelRegister(MemberInfo memberinfo);
-
-    /**
-     * 获取新的邀请码
-     *
-     * @return
-     */
-    public String getNewMemQrCode();
-
-    /**
-     * 根据手机号 和 密码  查询会员/用户信息
-     *
-     * @param username
-     * @param pwd
-     * @return
-     */
-    public MemberInfo login(String username, String pwd);
-
-    /**
-     * 根据手机号查询会员/用户信息数量
-     *
-     * @param tel
-     * @return
-     */
-    public int getCountToMemberinfoByTel(String tel);
-
-    /**
-     * 根据主键pk 查询会员信息
-     *
-     * @param PK
-     * @return
-     */
-    public MemberInfo findMemberinfoByPK(int PK);
-
-    /**
-     * 获取签到返回值
-     * 会员PK,积分,最后一次签到时间,连续签到天数
-     *
-     * @return
-     */
-    public Map<String, Object> docard(int MemberPK);
-
-    /**
-     * 根据PK修改密码
-     *
-     * @param PK
-     * @param pwd
-     * @return
-     */
-    public int updatePassword(int PK, String pwd);
-
-    /**
-     * 根据手机号/账号	获取密码
-     *
-     * @param tel
-     * @return
-     */
-    public String findPwdByTel(String tel);
-
-    /**
-     * 根据手机号 查询账号pk
-     *
-     * @param tel
-     * @return
-     */
-    public int findMemberpkByTel(String tel);
-
-    /**
-     * 根据PK主键  修改昵称
-     *
-     * @param PK
-     * @param Pet
-     */
-    public int updatePetByPK(int PK, String Pet);
-
-    /**
-     * 根据主键PK修改地区
-     *
-     * @param PK
-     * @param Area
-     * @return
-     */
-    public int updateAreaByPK(int PK, int Area);
-
-    /**
-     * 修改用户头像
-     *
-     * @param pk
-     * @param hphoto
-     * @return
-     */
-    public int updateMemberhphotoByPk(int pk, String hphoto);
-
-    /**
-     * 根据PK 修改手机号
-     *
-     * @param pk
-     * @param phone
-     * @return
-     */
-    public int updateMemberPhoneByPk(int pk, String phone);
-
-    /**
-     * 根据PK 修改token
-     *
-     * @param pk
-     * @param token
-     * @return
-     */
-    public int updateMemberTokenByPk(int pk, String token);
-
-    /**
-     * 发红包 时 更新金额
-     *
-     * @param memberPk
-     * @param coin
-     * @return
-     */
-    public int updateMemberToGiveRed_Disable(int memberPk, double coin);
-
-    /**
-     * 收红包 时 更新金额
-     *
-     * @param redPacketPk 红包pk
-     * @param modelPk     收红包的人才pk
-     * @param memberPk    发红包的会员pk
-     * @param coin        发红包的金额
-     * @return
-     */
-    public int updateMemberToReceiveRed_Disable(int redPacketPk, int modelPk, int memberPk, double coin);
-
-
-    /**
-     * 根据
-     *
-     * @param pk
-     * @return
-     */
-    public MemberInfo getMemberInfoByPk(int pk);
-
-    /**
-     * 修改用户信息  根据人才pk
-     *
-     * @param modelpk
-     * @param name
-     * @param age
-     * @param area
-     * @return
-     */
-    public int updateMemberInfoByModelPk(int modelpk, String name, String age, String area);
-
-    /**
-     * 根据会员pk 查询会员昵称Pet
-     *
-     * @param pk
-     * @return
-     */
-    public String findMemberPetByPk(int pk);
-
-    /**
-     * 累加充值币额
-     *
-     * @param memberpk
-     * @param coin
-     * @return
-     */
-    public int addMemberCoinI(int memberpk, double coin);
-
-    /**
-     * 修改支付宝账号  根据 会员pk
-     *
-     * @param memberpk
-     * @param wid
-     * @return
-     */
-    public int updateMemberWidByMemberpk(int memberpk, String wid);
-
-    /**
-     * 提现减去余额里面的钱
-     *
-     * @param memberpk
-     * @param fee
-     * @return
-     */
-    public int updateMemberInfoToOutCash(int memberpk, double fee);
-
-    /**
-     * 提现减去营销币里面的钱
-     *
-     * @param memberpk
-     * @param fee
-     * @return
-     */
-    public int updateMemberInfoToOutCashShare(int memberpk, double fee);
-
-    /**
-     * 扣除预支付的钱,添加到余额里面
-     *
-     * @param memberpk        会员pk
-     * @param subtract_coin_o 减去预支里面的金额
-     * @param plus_coin_a     添加到余额里面的金额
-     * @return
-     */
-    public int updateMemberCoinOToCoinA_Disable(int memberpk, double subtract_coin_o, double plus_coin_a);
-
-    /**
-     * 根据手机号修改密码
-     *
-     * @param phone
-     * @param pass
-     * @return
-     */
-    public int updateMemberSetPassByPhone(String phone, String pass);
-
-    /**
-     * 查询memberpk  是否是模特
-     *
-     * @param memberpk
-     * @return
-     */
-    public int findMemberIsModel(int memberpk);
-
-    /**
-     * 根据邀请码 获取 pk
-     *
-     * @param introducerpk
-     * @return
-     */
-    public int findMemberpkByQRcode(String QRCode);
-
-    public int findIntroducerPkByTel(String tel);
-
-    /**
-     * 添加举报记录
-     *
-     * @param reportInfo
-     * @return
-     */
-    public int insertReportInfo(ReportInfo reportInfo);
-
-    /**
-     * 删除评论
-     *
-     * @param modelprivatediscusspk
-     * @param privatepk
-     * @return
-     */
-    public int deleteModelPrivateDiscuss(int modelprivatediscusspk, int privatepk);
-
-    /**
-     * 添加屏蔽模特
-     *
-     * @param nexus
-     * @return
-     */
-    public int insertNexus(Nexus nexus);
-
-    /**
-     * 删除屏蔽的模特
-     *
-     * @param nexus
-     * @return
-     */
-    public int deleteNexus(Nexus nexus);
-
-    /**
-     * 查询屏蔽的模特
-     *
-     * @param nexus
-     * @return
-     */
-    public Page<List<Nexus>> findNexusByPage(Nexus nexus, int index, int size);
-
-    /**
-     * 查询全部屏蔽的模特
-     *
-     * @param nexus
-     * @return
-     */
-    public List<Nexus> findNexusAll(Nexus nexus);
-
-    /**
-     * 查询推荐人数
-     */
-    int findIntroduceNum(int memberpk, int type);
-
-    /**
-     * 获取推荐列表
-     */
-    List<JSONObject> findIntroduceList(int memberpk, int type);
-
-    /**
-     * 获取分销总金额
-     */
-    double findTotalShareCoin(int memberpk, int type);
-
-    /**
-     * 获取当前营销币余额
-     */
-    double queryCurrentShareCoinAmount(int memberpk);
-
-    /**
-     * 获取不可提取营销币余额
-     */
-    double queryLockShareCoinAmount(int memberpk);
-
-    /**
-     * 营销币转M币
-     */
-    boolean transferShareCoin(int memberpk, double amount);
-
-
-    boolean canChat(int memberpk);
-
-    String getAppVersion();
-}
+package com.thmodel.dao;
+
+import java.util.List;
+import java.util.Map;
+
+import com.thmodel.entity.MemberInfo;
+import com.thmodel.entity.Nexus;
+import com.thmodel.entity.ReportInfo;
+import com.thmodel.jooq.tables.records.MemberinfoRecord;
+import com.thmodel.page.Page;
+import net.sf.json.JSONObject;
+import org.jooq.Record;
+
+import javax.servlet.http.HttpServletRequest;
+
+public interface MemberinfoDao {
+
+    /**
+     * 客户端注册
+     * 插入会员账号信息表
+     *
+     * @param memberinfo
+     * @return
+     */
+    public int insertMemberinfoByRegister(MemberInfo memberinfo, String qrcode, HttpServletRequest request);
+
+    /**
+     * 模特端注册
+     * 插入会员账号信息表
+     *
+     * @param memberinfo
+     * @return
+     */
+    public int insertMemberinfoByModelRegister(MemberInfo memberinfo);
+
+    /**
+     * 获取新的邀请码
+     *
+     * @return
+     */
+    public String getNewMemQrCode();
+
+    /**
+     * 根据手机号 和 密码  查询会员/用户信息
+     *
+     * @param username
+     * @param pwd
+     * @return
+     */
+    public MemberInfo login(String username, String pwd);
+
+    /**
+     * 根据手机号查询会员/用户信息数量
+     *
+     * @param tel
+     * @return
+     */
+    public int getCountToMemberinfoByTel(String tel);
+
+    /**
+     * 根据主键pk 查询会员信息
+     *
+     * @param PK
+     * @return
+     */
+    public MemberInfo findMemberinfoByPK(int PK);
+
+    /**
+     * 获取签到返回值
+     * 会员PK,积分,最后一次签到时间,连续签到天数
+     *
+     * @return
+     */
+    public Map<String, Object> docard(int MemberPK);
+
+    /**
+     * 根据PK修改密码
+     *
+     * @param PK
+     * @param pwd
+     * @return
+     */
+    public int updatePassword(int PK, String pwd);
+
+    /**
+     * 根据手机号/账号	获取密码
+     *
+     * @param tel
+     * @return
+     */
+    public String findPwdByTel(String tel);
+
+    /**
+     * 根据手机号 查询账号pk
+     *
+     * @param tel
+     * @return
+     */
+    public int findMemberpkByTel(String tel);
+
+    /**
+     * 根据PK主键  修改昵称
+     *
+     * @param PK
+     * @param Pet
+     */
+    public int updatePetByPK(int PK, String Pet);
+
+    /**
+     * 根据主键PK修改地区
+     *
+     * @param PK
+     * @param Area
+     * @return
+     */
+    public int updateAreaByPK(int PK, int Area);
+
+    /**
+     * 修改用户头像
+     *
+     * @param pk
+     * @param hphoto
+     * @return
+     */
+    public int updateMemberhphotoByPk(int pk, String hphoto);
+
+    /**
+     * 根据PK 修改手机号
+     *
+     * @param pk
+     * @param phone
+     * @return
+     */
+    public int updateMemberPhoneByPk(int pk, String phone);
+
+    /**
+     * 根据PK 修改token
+     *
+     * @param pk
+     * @param token
+     * @return
+     */
+    public int updateMemberTokenByPk(int pk, String token);
+
+    /**
+     * 发红包 时 更新金额
+     *
+     * @param memberPk
+     * @param coin
+     * @return
+     */
+    public int updateMemberToGiveRed_Disable(int memberPk, double coin);
+
+    /**
+     * 收红包 时 更新金额
+     *
+     * @param redPacketPk 红包pk
+     * @param modelPk     收红包的人才pk
+     * @param memberPk    发红包的会员pk
+     * @param coin        发红包的金额
+     * @return
+     */
+    public int updateMemberToReceiveRed_Disable(int redPacketPk, int modelPk, int memberPk, double coin);
+
+
+    /**
+     * 根据
+     *
+     * @param pk
+     * @return
+     */
+    public MemberInfo getMemberInfoByPk(int pk);
+
+    /**
+     * 修改用户信息  根据人才pk
+     *
+     * @param modelpk
+     * @param name
+     * @param age
+     * @param area
+     * @return
+     */
+    public int updateMemberInfoByModelPk(int modelpk, String name, String age, String area);
+
+    /**
+     * 根据会员pk 查询会员昵称Pet
+     *
+     * @param pk
+     * @return
+     */
+    public String findMemberPetByPk(int pk);
+
+    /**
+     * 累加充值币额
+     *
+     * @param memberpk
+     * @param coin
+     * @return
+     */
+    public int addMemberCoinI(int memberpk, double coin);
+
+    /**
+     * 修改支付宝账号  根据 会员pk
+     *
+     * @param memberpk
+     * @param wid
+     * @return
+     */
+    public int updateMemberWidByMemberpk(int memberpk, String wid);
+
+    /**
+     * 提现减去余额里面的钱
+     *
+     * @param memberpk
+     * @param fee
+     * @return
+     */
+    public int updateMemberInfoToOutCash(int memberpk, double fee);
+
+    /**
+     * 提现减去营销币里面的钱
+     *
+     * @param memberpk
+     * @param fee
+     * @return
+     */
+    public int updateMemberInfoToOutCashShare(int memberpk, double fee);
+
+    /**
+     * 扣除预支付的钱,添加到余额里面
+     *
+     * @param memberpk        会员pk
+     * @param subtract_coin_o 减去预支里面的金额
+     * @param plus_coin_a     添加到余额里面的金额
+     * @return
+     */
+    public int updateMemberCoinOToCoinA_Disable(int memberpk, double subtract_coin_o, double plus_coin_a);
+
+    /**
+     * 根据手机号修改密码
+     *
+     * @param phone
+     * @param pass
+     * @return
+     */
+    public int updateMemberSetPassByPhone(String phone, String pass);
+
+    /**
+     * 查询memberpk  是否是模特
+     *
+     * @param memberpk
+     * @return
+     */
+    public int findMemberIsModel(int memberpk);
+
+    /**
+     * 根据邀请码 获取 pk
+     *
+     * @param introducerpk
+     * @return
+     */
+    public int findMemberpkByQRcode(String QRCode);
+
+    public int findIntroducerPkByTel(String tel);
+
+    /**
+     * 添加举报记录
+     *
+     * @param reportInfo
+     * @return
+     */
+    public int insertReportInfo(ReportInfo reportInfo);
+
+    /**
+     * 删除评论
+     *
+     * @param modelprivatediscusspk
+     * @param privatepk
+     * @return
+     */
+    public int deleteModelPrivateDiscuss(int modelprivatediscusspk, int privatepk);
+
+    /**
+     * 添加屏蔽模特
+     *
+     * @param nexus
+     * @return
+     */
+    public int insertNexus(Nexus nexus);
+
+    /**
+     * 删除屏蔽的模特
+     *
+     * @param nexus
+     * @return
+     */
+    public int deleteNexus(Nexus nexus);
+
+    /**
+     * 查询屏蔽的模特
+     *
+     * @param nexus
+     * @return
+     */
+    public Page<List<Nexus>> findNexusByPage(Nexus nexus, int index, int size);
+
+    /**
+     * 查询全部屏蔽的模特
+     *
+     * @param nexus
+     * @return
+     */
+    public List<Nexus> findNexusAll(Nexus nexus);
+
+    /**
+     * 查询推荐人数
+     */
+    int findIntroduceNum(int memberpk, int type);
+
+    /**
+     * 获取推荐列表
+     */
+    List<JSONObject> findIntroduceList(int memberpk, int type);
+
+    /**
+     * 获取分销总金额
+     */
+    double findTotalShareCoin(int memberpk, int type);
+
+    /**
+     * 获取当前营销币余额
+     */
+    double queryCurrentShareCoinAmount(int memberpk);
+
+    /**
+     * 获取不可提取营销币余额
+     */
+    double queryLockShareCoinAmount(int memberpk);
+
+    /**
+     * 营销币转M币
+     */
+    boolean transferShareCoin(int memberpk, double amount);
+
+
+    boolean canChat(int memberpk);
+
+    String getAppVersion();
+
+    int updateMemberInfo(MemberinfoRecord record);
+}

+ 64 - 12
src/main/java/com/thmodel/dao/impl/IntegralDaoImpl.java

@@ -5,25 +5,41 @@ import com.thmodel.dbconnection.DbConnection;
 import com.thmodel.entity.ExchangeInfo;
 import com.thmodel.entity.MerchandiseInfo;
 import com.thmodel.jooq.tables.records.ExchangeinfoRecord;
+import com.thmodel.jooq.tables.records.MerchandiseinfoRecord;
 import com.thmodel.util.DBRecordsPack;
 import net.sf.json.JSONObject;
-import org.jooq.Condition;
-import org.jooq.DSLContext;
-import org.jooq.Record;
-import org.jooq.Result;
+import org.apache.commons.beanutils.BeanUtils;
+import org.apache.commons.beanutils.PropertyUtils;
+import org.jooq.*;
 import org.jooq.impl.DSL;
 
-import java.util.ArrayList;
-import java.util.List;
+import java.lang.reflect.InvocationTargetException;
+import java.util.*;
 
 import static com.thmodel.jooq.Tables.EXCHANGEINFO;
 import static com.thmodel.jooq.Tables.MERCHANDISEINFO;
 
 public class IntegralDaoImpl implements IntegralDao {
+    @Override
+    public MerchandiseInfo queryMerchandiseInfo(int id) {
+        DSLContext ctx = DSL.using(DbConnection.getPara("MySQLURL"));
+        Record record = ctx.select().from(MERCHANDISEINFO).where(MERCHANDISEINFO.ID.equal(id)).fetchAny();
+        if (record != null) {
+            MerchandiseInfo merchandiseInfo = new MerchandiseInfo();
+            try {
+                BeanUtils.populate(merchandiseInfo, record.intoMap());
+                return merchandiseInfo;
+            } catch (IllegalAccessException | InvocationTargetException e) {
+                e.printStackTrace();
+            }
+        }
+        return null;
+    }
+
     @Override
     public List<JSONObject> queryMerchandisesByPage(MerchandiseInfo record, int page) {
         DSLContext ctx = DSL.using(DbConnection.getPara("MySQLURL"));
-        Result<Record> result = ctx.select().from(MERCHANDISEINFO).where(getConditions(record)).limit((page - 1) * 10, 10).fetch();
+        Result<Record> result = ctx.select().from(MERCHANDISEINFO).where(getConditions(record)).orderBy(MERCHANDISEINFO.ID.desc()).limit((page - 1) * 10, 10).fetch();
         List<JSONObject> list = DBRecordsPack.Pack(result);
         ctx.close();
         return list;
@@ -32,7 +48,7 @@ public class IntegralDaoImpl implements IntegralDao {
     @Override
     public List<JSONObject> queryExchangeInfoByPage(ExchangeInfo record, int page) {
         DSLContext ctx = DSL.using(DbConnection.getPara("MySQLURL"));
-        Result<Record> result = ctx.select().from(MERCHANDISEINFO).where(getConditions(record)).fetch();
+        Result<Record> result = ctx.select().from(EXCHANGEINFO).where(getConditions(record)).orderBy(EXCHANGEINFO.ID.desc()).limit((page - 1) * 10, 10).fetch();
         List<JSONObject> list = DBRecordsPack.Pack(result);
         ctx.close();
         return list;
@@ -40,19 +56,37 @@ public class IntegralDaoImpl implements IntegralDao {
 
     @Override
     public List<JSONObject> queryAllMerchandises(MerchandiseInfo record) {
-        return null;
+        DSLContext ctx = DSL.using(DbConnection.getPara("MySQLURL"));
+        Result<Record> result = ctx.select().from(MERCHANDISEINFO).where(getConditions(record)).orderBy(MERCHANDISEINFO.ID.desc()).fetch();
+        List<JSONObject> list = DBRecordsPack.Pack(result);
+        ctx.close();
+        return list;
     }
 
     @Override
     public List<JSONObject> queryAllExchangeInfo(ExchangeInfo record) {
-        return null;
+        DSLContext ctx = DSL.using(DbConnection.getPara("MySQLURL"));
+        Result<Record> result = ctx.select().from(EXCHANGEINFO).where(getConditions(record)).orderBy(EXCHANGEINFO.ID.desc()).fetch();
+        List<JSONObject> list = DBRecordsPack.Pack(result);
+        ctx.close();
+        return list;
     }
 
     @Override
-    public int saveExchangeInfo(ExchangeinfoRecord record) {
-        return 0;
+    public int saveExchangeInfo(ExchangeInfo record) {
+        DSLContext ctx = DSL.using(DbConnection.getPara("MySQLURL"));
+        int num = ctx.insertInto(EXCHANGEINFO).set(convert(record)).execute();
+        ctx.close();
+        return num;
     }
 
+    @Override
+    public int updateMerchandiseInfo(MerchandiseinfoRecord record) {
+        DSLContext ctx = DSL.using(DbConnection.getPara("MySQLURL"));
+        int num = ctx.update(MERCHANDISEINFO).set(record).where(MERCHANDISEINFO.ID.equal(record.getId())).execute();
+        ctx.close();
+        return num;
+    }
 
     private List<Condition> getConditions(MerchandiseInfo record) {
         List<Condition> conditions = new ArrayList<>();
@@ -81,4 +115,22 @@ public class IntegralDaoImpl implements IntegralDao {
         }
         return conditions;
     }
+
+    private ExchangeinfoRecord convert(ExchangeInfo src) {
+        ExchangeinfoRecord dst = new ExchangeinfoRecord();
+        try {
+            Map map = PropertyUtils.describe(src);
+            Map newMap = new HashMap();
+            Set<Map.Entry> entrySet = map.entrySet();
+            for (Map.Entry entry : entrySet) {
+                if (entry.getValue() != null) {
+                    newMap.put(entry.getKey().toString().toLowerCase(), entry.getValue());
+                }
+            }
+            BeanUtils.populate(dst, newMap);
+        } catch (IllegalAccessException | InvocationTargetException | NoSuchMethodException e) {
+            e.printStackTrace();
+        }
+        return dst;
+    }
 }

+ 10 - 0
src/main/java/com/thmodel/dao/impl/MemberinfoDaoImpl.java

@@ -283,6 +283,7 @@ public class MemberinfoDaoImpl implements MemberinfoDao {
                 memberinfo.setCoin_o(rs.getDouble("coin_O"));
                 memberinfo.setCoin_oi(rs.getDouble("coin_OI"));
                 memberinfo.setCoin_share(rs.getDouble("coin_share"));
+                memberinfo.setIntegral(rs.getInt("integral"));
                 db.close(rs);
             }
 
@@ -477,6 +478,7 @@ public class MemberinfoDaoImpl implements MemberinfoDao {
                 memberinfo.setCoin_om(rs.getDouble("coin_OM"));
                 memberinfo.setCoin_o(rs.getDouble("coin_O"));
                 memberinfo.setCoin_share(rs.getDouble("coin_share"));
+                memberinfo.setIntegral(rs.getInt("integral"));
                 db.close(rs);
             }
             if (memberinfo.getPk() > 0) {
@@ -853,4 +855,12 @@ public class MemberinfoDaoImpl implements MemberinfoDao {
         return appJson;
     }
 
+    @Override
+    public int updateMemberInfo(MemberinfoRecord record) {
+        DSLContext ctx = DSL.using(DbConnection.getPara("MySQLURL"));
+        int num = ctx.update(MEMBERINFO).set(record).where(MEMBERINFO.PK.equal(record.getPk())).execute();
+        ctx.close();
+        return num;
+    }
+
 }

+ 18 - 0
src/main/java/com/thmodel/entity/ExchangeInfo.java

@@ -6,6 +6,8 @@ public class ExchangeInfo {
     private Integer id;
     private Integer memberPK;
     private Integer merchandiseId;
+    private String  merchandiseName;
+    private String  cover;
     private Integer price;
     private Integer integral;
     private Integer amount;
@@ -138,4 +140,20 @@ public class ExchangeInfo {
     public void setShippedTime(Date shippedTime) {
         this.shippedTime = shippedTime;
     }
+
+    public String getMerchandiseName() {
+        return merchandiseName;
+    }
+
+    public void setMerchandiseName(String merchandiseName) {
+        this.merchandiseName = merchandiseName;
+    }
+
+    public String getCover() {
+        return cover;
+    }
+
+    public void setCover(String cover) {
+        this.cover = cover;
+    }
 }

+ 404 - 395
src/main/java/com/thmodel/entity/MemberInfo.java

@@ -1,395 +1,404 @@
-package com.thmodel.entity;
-
-import java.util.Date;
-
-import com.alibaba.fastjson.annotation.JSONField;
-
-/**
- * 会员/账号信息表
- *
- * @author Administrator
- */
-public class MemberInfo {
-
-    private int    pk;
-    private int    membtype;        //会员类别
-    private int    membclass;       //会员级别
-    private String qrcode;          //二维码编号
-    private String tel;             //帐号
-    private String phone;           //电话号码
-    private String pass;            //密码
-    private String paypass;         //支付密码
-    private String pet;             //昵称
-    private String hphoto;          //头像
-    private String photo;           //照片
-    private int    area;            //地区
-    private String age;             //年龄
-    private String id;              //身份证号
-    private int    islive;          //消息提醒
-    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
-    private Date   mdate;           //注册日期
-    private String token;           //消息令牌
-    private int    acc;             //积分
-    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
-    private Date   lastsign;        //最后一次签到
-    private int    signdays;        //连续签到多到天
-    private int    introducerpk;    //推荐人pk
-    private String identify;        //认证状态
-    private String id_a;            //身份证正面
-    private String id_b;            //身份证反面
-    private String id_c;            //手持身份拍照
-    private String wid;             //微信提现帐号
-    private double coin_a;          //账户总币额(虚拟贝)
-    private double coin_ir;         //红包收入币额
-    private double coin_iv;         //聊天收到币额
-    private double coin_is;         //服务收入币额
-    private double coin_irr;        //红包分红币额
-    private double coin_ivv;        //聊天分成币额
-    private double coin_iss;        //服务分成币额
-    private double coin_ill;        //队长收入币额
-    private double coin_i;          //冲值币额
-    private double coin_or;         //红包支付币额
-    private double coin_ov;         //聊天支付币额
-    private double coin_os;         //订单支付币额
-    private double coin_om;         //模卡支付币额
-    private double coin_o;          //提现支出币额
-    private double coin_oi;         //预支币额
-    private double coin_share;      //营销币
-
-
-    public double getCoin_a() {
-        return coin_a;
-    }
-
-    public void setCoin_a(double coin_a) {
-        this.coin_a = coin_a;
-    }
-
-    public int getPk() {
-        return pk;
-    }
-
-    public void setPk(int pk) {
-        this.pk = pk;
-    }
-
-    public int getMembtype() {
-        return membtype;
-    }
-
-    public void setMembtype(int membtype) {
-        this.membtype = membtype;
-    }
-
-    public int getMembclass() {
-        return membclass;
-    }
-
-    public void setMembclass(int membclass) {
-        this.membclass = membclass;
-    }
-
-    public String getQrcode() {
-        return qrcode;
-    }
-
-    public void setQrcode(String qrcode) {
-        this.qrcode = qrcode;
-    }
-
-    public String getTel() {
-        return tel;
-    }
-
-    public void setTel(String tel) {
-        this.tel = tel;
-    }
-
-    public String getPass() {
-        return pass;
-    }
-
-    public void setPass(String pass) {
-        this.pass = pass;
-    }
-
-    public String getPaypass() {
-        return paypass;
-    }
-
-    public void setPaypass(String paypass) {
-        this.paypass = paypass;
-    }
-
-    public String getPet() {
-        return pet;
-    }
-
-    public void setPet(String pet) {
-        this.pet = pet;
-    }
-
-    public String getHphoto() {
-        return hphoto;
-    }
-
-    public void setHphoto(String hphoto) {
-        this.hphoto = hphoto;
-    }
-
-    public String getPhoto() {
-        return photo;
-    }
-
-    public void setPhoto(String photo) {
-        this.photo = photo;
-    }
-
-    public int getArea() {
-        return area;
-    }
-
-    public void setArea(int area) {
-        this.area = area;
-    }
-
-    public String getAge() {
-        return age;
-    }
-
-    public void setAge(String age) {
-        this.age = age;
-    }
-
-    public String getId() {
-        return id;
-    }
-
-    public void setId(String id) {
-        this.id = id;
-    }
-
-    public int getIslive() {
-        return islive;
-    }
-
-    public void setIslive(int islive) {
-        this.islive = islive;
-    }
-
-    public Date getMdate() {
-        return mdate;
-    }
-
-    public void setMdate(Date mdate) {
-        this.mdate = mdate;
-    }
-
-    public String getToken() {
-        return token;
-    }
-
-    public void setToken(String token) {
-        this.token = token;
-    }
-
-    public int getAcc() {
-        return acc;
-    }
-
-    public void setAcc(int acc) {
-        this.acc = acc;
-    }
-
-    public Date getLastsign() {
-        return lastsign;
-    }
-
-    public void setLastsign(Date lastsign) {
-        this.lastsign = lastsign;
-    }
-
-    public int getSigndays() {
-        return signdays;
-    }
-
-    public void setSigndays(int signdays) {
-        this.signdays = signdays;
-    }
-
-    public int getIntroducerpk() {
-        return introducerpk;
-    }
-
-    public void setIntroducerpk(int introducerpk) {
-        this.introducerpk = introducerpk;
-    }
-
-    public String getIdentify() {
-        return identify;
-    }
-
-    public void setIdentify(String identify) {
-        this.identify = identify;
-    }
-
-    public String getId_a() {
-        return id_a;
-    }
-
-    public void setId_a(String id_a) {
-        this.id_a = id_a;
-    }
-
-    public String getId_b() {
-        return id_b;
-    }
-
-    public void setId_b(String id_b) {
-        this.id_b = id_b;
-    }
-
-    public String getId_c() {
-        return id_c;
-    }
-
-    public void setId_c(String id_c) {
-        this.id_c = id_c;
-    }
-
-    public String getWid() {
-        return wid;
-    }
-
-    public void setWid(String wid) {
-        this.wid = wid;
-    }
-
-    public double getCoin_ir() {
-        return coin_ir;
-    }
-
-    public void setCoin_ir(double coin_ir) {
-        this.coin_ir = coin_ir;
-    }
-
-    public double getCoin_iv() {
-        return coin_iv;
-    }
-
-    public void setCoin_iv(double coin_iv) {
-        this.coin_iv = coin_iv;
-    }
-
-    public double getCoin_is() {
-        return coin_is;
-    }
-
-    public void setCoin_is(double coin_is) {
-        this.coin_is = coin_is;
-    }
-
-    public double getCoin_irr() {
-        return coin_irr;
-    }
-
-    public void setCoin_irr(double coin_irr) {
-        this.coin_irr = coin_irr;
-    }
-
-    public double getCoin_ivv() {
-        return coin_ivv;
-    }
-
-    public void setCoin_ivv(double coin_ivv) {
-        this.coin_ivv = coin_ivv;
-    }
-
-    public double getCoin_iss() {
-        return coin_iss;
-    }
-
-    public void setCoin_iss(double coin_iss) {
-        this.coin_iss = coin_iss;
-    }
-
-    public double getCoin_ill() {
-        return coin_ill;
-    }
-
-    public void setCoin_ill(double coin_ill) {
-        this.coin_ill = coin_ill;
-    }
-
-    public double getCoin_i() {
-        return coin_i;
-    }
-
-    public void setCoin_i(double coin_i) {
-        this.coin_i = coin_i;
-    }
-
-    public double getCoin_or() {
-        return coin_or;
-    }
-
-    public void setCoin_or(double coin_or) {
-        this.coin_or = coin_or;
-    }
-
-    public double getCoin_ov() {
-        return coin_ov;
-    }
-
-    public void setCoin_ov(double coin_ov) {
-        this.coin_ov = coin_ov;
-    }
-
-    public double getCoin_os() {
-        return coin_os;
-    }
-
-    public void setCoin_os(double coin_os) {
-        this.coin_os = coin_os;
-    }
-
-    public double getCoin_om() {
-        return coin_om;
-    }
-
-    public void setCoin_om(double coin_om) {
-        this.coin_om = coin_om;
-    }
-
-    public double getCoin_o() {
-        return coin_o;
-    }
-
-    public void setCoin_o(double coin_o) {
-        this.coin_o = coin_o;
-    }
-
-    public double getCoin_oi() {
-        return coin_oi;
-    }
-
-    public void setCoin_oi(double coin_oi) {
-        this.coin_oi = coin_oi;
-    }
-
-    public String getPhone() {
-        return phone;
-    }
-
-    public void setPhone(String phone) {
-        this.phone = phone;
-    }
-
-    public double getCoin_share() {
-        return coin_share;
-    }
-
-    public void setCoin_share(double coin_share) {
-        this.coin_share = coin_share;
-    }
-}
+package com.thmodel.entity;
+
+import java.util.Date;
+
+import com.alibaba.fastjson.annotation.JSONField;
+
+/**
+ * 会员/账号信息表
+ *
+ * @author Administrator
+ */
+public class MemberInfo {
+
+    private int    pk;
+    private int    membtype;        //会员类别
+    private int    membclass;       //会员级别
+    private String qrcode;          //二维码编号
+    private String tel;             //帐号
+    private String phone;           //电话号码
+    private String pass;            //密码
+    private String paypass;         //支付密码
+    private String pet;             //昵称
+    private String hphoto;          //头像
+    private String photo;           //照片
+    private int    area;            //地区
+    private String age;             //年龄
+    private String id;              //身份证号
+    private int    islive;          //消息提醒
+    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
+    private Date   mdate;           //注册日期
+    private String token;           //消息令牌
+    private int    acc;             //积分
+    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
+    private Date   lastsign;        //最后一次签到
+    private int    signdays;        //连续签到多到天
+    private int    introducerpk;    //推荐人pk
+    private String identify;        //认证状态
+    private String id_a;            //身份证正面
+    private String id_b;            //身份证反面
+    private String id_c;            //手持身份拍照
+    private String wid;             //微信提现帐号
+    private double coin_a;          //账户总币额(虚拟贝)
+    private double coin_ir;         //红包收入币额
+    private double coin_iv;         //聊天收到币额
+    private double coin_is;         //服务收入币额
+    private double coin_irr;        //红包分红币额
+    private double coin_ivv;        //聊天分成币额
+    private double coin_iss;        //服务分成币额
+    private double coin_ill;        //队长收入币额
+    private double coin_i;          //冲值币额
+    private double coin_or;         //红包支付币额
+    private double coin_ov;         //聊天支付币额
+    private double coin_os;         //订单支付币额
+    private double coin_om;         //模卡支付币额
+    private double coin_o;          //提现支出币额
+    private double coin_oi;         //预支币额
+    private double coin_share;      //营销币
+    private int    integral;        //积分
+
+
+    public double getCoin_a() {
+        return coin_a;
+    }
+
+    public void setCoin_a(double coin_a) {
+        this.coin_a = coin_a;
+    }
+
+    public int getPk() {
+        return pk;
+    }
+
+    public void setPk(int pk) {
+        this.pk = pk;
+    }
+
+    public int getMembtype() {
+        return membtype;
+    }
+
+    public void setMembtype(int membtype) {
+        this.membtype = membtype;
+    }
+
+    public int getMembclass() {
+        return membclass;
+    }
+
+    public void setMembclass(int membclass) {
+        this.membclass = membclass;
+    }
+
+    public String getQrcode() {
+        return qrcode;
+    }
+
+    public void setQrcode(String qrcode) {
+        this.qrcode = qrcode;
+    }
+
+    public String getTel() {
+        return tel;
+    }
+
+    public void setTel(String tel) {
+        this.tel = tel;
+    }
+
+    public String getPass() {
+        return pass;
+    }
+
+    public void setPass(String pass) {
+        this.pass = pass;
+    }
+
+    public String getPaypass() {
+        return paypass;
+    }
+
+    public void setPaypass(String paypass) {
+        this.paypass = paypass;
+    }
+
+    public String getPet() {
+        return pet;
+    }
+
+    public void setPet(String pet) {
+        this.pet = pet;
+    }
+
+    public String getHphoto() {
+        return hphoto;
+    }
+
+    public void setHphoto(String hphoto) {
+        this.hphoto = hphoto;
+    }
+
+    public String getPhoto() {
+        return photo;
+    }
+
+    public void setPhoto(String photo) {
+        this.photo = photo;
+    }
+
+    public int getArea() {
+        return area;
+    }
+
+    public void setArea(int area) {
+        this.area = area;
+    }
+
+    public String getAge() {
+        return age;
+    }
+
+    public void setAge(String age) {
+        this.age = age;
+    }
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public int getIslive() {
+        return islive;
+    }
+
+    public void setIslive(int islive) {
+        this.islive = islive;
+    }
+
+    public Date getMdate() {
+        return mdate;
+    }
+
+    public void setMdate(Date mdate) {
+        this.mdate = mdate;
+    }
+
+    public String getToken() {
+        return token;
+    }
+
+    public void setToken(String token) {
+        this.token = token;
+    }
+
+    public int getAcc() {
+        return acc;
+    }
+
+    public void setAcc(int acc) {
+        this.acc = acc;
+    }
+
+    public Date getLastsign() {
+        return lastsign;
+    }
+
+    public void setLastsign(Date lastsign) {
+        this.lastsign = lastsign;
+    }
+
+    public int getSigndays() {
+        return signdays;
+    }
+
+    public void setSigndays(int signdays) {
+        this.signdays = signdays;
+    }
+
+    public int getIntroducerpk() {
+        return introducerpk;
+    }
+
+    public void setIntroducerpk(int introducerpk) {
+        this.introducerpk = introducerpk;
+    }
+
+    public String getIdentify() {
+        return identify;
+    }
+
+    public void setIdentify(String identify) {
+        this.identify = identify;
+    }
+
+    public String getId_a() {
+        return id_a;
+    }
+
+    public void setId_a(String id_a) {
+        this.id_a = id_a;
+    }
+
+    public String getId_b() {
+        return id_b;
+    }
+
+    public void setId_b(String id_b) {
+        this.id_b = id_b;
+    }
+
+    public String getId_c() {
+        return id_c;
+    }
+
+    public void setId_c(String id_c) {
+        this.id_c = id_c;
+    }
+
+    public String getWid() {
+        return wid;
+    }
+
+    public void setWid(String wid) {
+        this.wid = wid;
+    }
+
+    public double getCoin_ir() {
+        return coin_ir;
+    }
+
+    public void setCoin_ir(double coin_ir) {
+        this.coin_ir = coin_ir;
+    }
+
+    public double getCoin_iv() {
+        return coin_iv;
+    }
+
+    public void setCoin_iv(double coin_iv) {
+        this.coin_iv = coin_iv;
+    }
+
+    public double getCoin_is() {
+        return coin_is;
+    }
+
+    public void setCoin_is(double coin_is) {
+        this.coin_is = coin_is;
+    }
+
+    public double getCoin_irr() {
+        return coin_irr;
+    }
+
+    public void setCoin_irr(double coin_irr) {
+        this.coin_irr = coin_irr;
+    }
+
+    public double getCoin_ivv() {
+        return coin_ivv;
+    }
+
+    public void setCoin_ivv(double coin_ivv) {
+        this.coin_ivv = coin_ivv;
+    }
+
+    public double getCoin_iss() {
+        return coin_iss;
+    }
+
+    public void setCoin_iss(double coin_iss) {
+        this.coin_iss = coin_iss;
+    }
+
+    public double getCoin_ill() {
+        return coin_ill;
+    }
+
+    public void setCoin_ill(double coin_ill) {
+        this.coin_ill = coin_ill;
+    }
+
+    public double getCoin_i() {
+        return coin_i;
+    }
+
+    public void setCoin_i(double coin_i) {
+        this.coin_i = coin_i;
+    }
+
+    public double getCoin_or() {
+        return coin_or;
+    }
+
+    public void setCoin_or(double coin_or) {
+        this.coin_or = coin_or;
+    }
+
+    public double getCoin_ov() {
+        return coin_ov;
+    }
+
+    public void setCoin_ov(double coin_ov) {
+        this.coin_ov = coin_ov;
+    }
+
+    public double getCoin_os() {
+        return coin_os;
+    }
+
+    public void setCoin_os(double coin_os) {
+        this.coin_os = coin_os;
+    }
+
+    public double getCoin_om() {
+        return coin_om;
+    }
+
+    public void setCoin_om(double coin_om) {
+        this.coin_om = coin_om;
+    }
+
+    public double getCoin_o() {
+        return coin_o;
+    }
+
+    public void setCoin_o(double coin_o) {
+        this.coin_o = coin_o;
+    }
+
+    public double getCoin_oi() {
+        return coin_oi;
+    }
+
+    public void setCoin_oi(double coin_oi) {
+        this.coin_oi = coin_oi;
+    }
+
+    public String getPhone() {
+        return phone;
+    }
+
+    public void setPhone(String phone) {
+        this.phone = phone;
+    }
+
+    public double getCoin_share() {
+        return coin_share;
+    }
+
+    public void setCoin_share(double coin_share) {
+        this.coin_share = coin_share;
+    }
+
+    public int getIntegral() {
+        return integral;
+    }
+
+    public void setIntegral(int integral) {
+        this.integral = integral;
+    }
+}

+ 11 - 1
src/main/java/com/thmodel/jooq/tables/Exchangeinfo.java

@@ -42,7 +42,7 @@ import org.jooq.impl.TableImpl;
 @SuppressWarnings({ "all", "unchecked", "rawtypes" })
 public class Exchangeinfo extends TableImpl<ExchangeinfoRecord> {
 
-    private static final long serialVersionUID = -661109031;
+    private static final long serialVersionUID = 2082532284;
 
     /**
      * The reference instance of <code>thmodel.exchangeinfo</code>
@@ -72,6 +72,16 @@ public class Exchangeinfo extends TableImpl<ExchangeinfoRecord> {
      */
     public final TableField<ExchangeinfoRecord, Integer> MERCHANDISEID = createField("merchandiseId", org.jooq.impl.SQLDataType.INTEGER, this, "");
 
+    /**
+     * The column <code>thmodel.exchangeinfo.cover</code>.
+     */
+    public final TableField<ExchangeinfoRecord, String> COVER = createField("cover", org.jooq.impl.SQLDataType.VARCHAR(255), this, "");
+
+    /**
+     * The column <code>thmodel.exchangeinfo.merchandiseName</code>.
+     */
+    public final TableField<ExchangeinfoRecord, String> MERCHANDISENAME = createField("merchandiseName", org.jooq.impl.SQLDataType.VARCHAR(255), this, "");
+
     /**
      * The column <code>thmodel.exchangeinfo.price</code>.
      */

+ 6 - 1
src/main/java/com/thmodel/jooq/tables/Memberinfo.java

@@ -43,7 +43,7 @@ import org.jooq.impl.TableImpl;
 @SuppressWarnings({ "all", "unchecked", "rawtypes" })
 public class Memberinfo extends TableImpl<MemberinfoRecord> {
 
-    private static final long serialVersionUID = -349879476;
+    private static final long serialVersionUID = -2083852993;
 
     /**
      * The reference instance of <code>thmodel.memberinfo</code>
@@ -343,6 +343,11 @@ public class Memberinfo extends TableImpl<MemberinfoRecord> {
      */
     public final TableField<MemberinfoRecord, String> UUID = createField("uuid", org.jooq.impl.SQLDataType.VARCHAR(255), this, "");
 
+    /**
+     * The column <code>thmodel.memberinfo.integral</code>.
+     */
+    public final TableField<MemberinfoRecord, Integer> INTEGRAL = createField("integral", org.jooq.impl.SQLDataType.INTEGER.defaultValue(org.jooq.impl.DSL.inline("0", org.jooq.impl.SQLDataType.INTEGER)), this, "");
+
     /**
      * Create a <code>thmodel.memberinfo</code> table reference
      */

+ 193 - 95
src/main/java/com/thmodel/jooq/tables/records/ExchangeinfoRecord.java

@@ -12,8 +12,8 @@ import javax.annotation.Generated;
 
 import org.jooq.Field;
 import org.jooq.Record1;
-import org.jooq.Record15;
-import org.jooq.Row15;
+import org.jooq.Record17;
+import org.jooq.Row17;
 import org.jooq.impl.UpdatableRecordImpl;
 
 
@@ -28,9 +28,9 @@ import org.jooq.impl.UpdatableRecordImpl;
     comments = "This class is generated by jOOQ"
 )
 @SuppressWarnings({ "all", "unchecked", "rawtypes" })
-public class ExchangeinfoRecord extends UpdatableRecordImpl<ExchangeinfoRecord> implements Record15<Integer, Integer, Integer, Integer, Integer, Integer, Integer, String, String, String, String, String, Timestamp, Integer, Timestamp> {
+public class ExchangeinfoRecord extends UpdatableRecordImpl<ExchangeinfoRecord> implements Record17<Integer, Integer, Integer, String, String, Integer, Integer, Integer, Integer, String, String, String, String, String, Timestamp, Integer, Timestamp> {
 
-    private static final long serialVersionUID = 230730442;
+    private static final long serialVersionUID = -1275072358;
 
     /**
      * Setter for <code>thmodel.exchangeinfo.id</code>.
@@ -74,172 +74,200 @@ public class ExchangeinfoRecord extends UpdatableRecordImpl<ExchangeinfoRecord>
         return (Integer) get(2);
     }
 
+    /**
+     * Setter for <code>thmodel.exchangeinfo.cover</code>.
+     */
+    public void setCover(String value) {
+        set(3, value);
+    }
+
+    /**
+     * Getter for <code>thmodel.exchangeinfo.cover</code>.
+     */
+    public String getCover() {
+        return (String) get(3);
+    }
+
+    /**
+     * Setter for <code>thmodel.exchangeinfo.merchandiseName</code>.
+     */
+    public void setMerchandisename(String value) {
+        set(4, value);
+    }
+
+    /**
+     * Getter for <code>thmodel.exchangeinfo.merchandiseName</code>.
+     */
+    public String getMerchandisename() {
+        return (String) get(4);
+    }
+
     /**
      * Setter for <code>thmodel.exchangeinfo.price</code>.
      */
     public void setPrice(Integer value) {
-        set(3, value);
+        set(5, value);
     }
 
     /**
      * Getter for <code>thmodel.exchangeinfo.price</code>.
      */
     public Integer getPrice() {
-        return (Integer) get(3);
+        return (Integer) get(5);
     }
 
     /**
      * Setter for <code>thmodel.exchangeinfo.integral</code>.
      */
     public void setIntegral(Integer value) {
-        set(4, value);
+        set(6, value);
     }
 
     /**
      * Getter for <code>thmodel.exchangeinfo.integral</code>.
      */
     public Integer getIntegral() {
-        return (Integer) get(4);
+        return (Integer) get(6);
     }
 
     /**
      * Setter for <code>thmodel.exchangeinfo.amount</code>.
      */
     public void setAmount(Integer value) {
-        set(5, value);
+        set(7, value);
     }
 
     /**
      * Getter for <code>thmodel.exchangeinfo.amount</code>.
      */
     public Integer getAmount() {
-        return (Integer) get(5);
+        return (Integer) get(7);
     }
 
     /**
      * Setter for <code>thmodel.exchangeinfo.totalIntegral</code>.
      */
     public void setTotalintegral(Integer value) {
-        set(6, value);
+        set(8, value);
     }
 
     /**
      * Getter for <code>thmodel.exchangeinfo.totalIntegral</code>.
      */
     public Integer getTotalintegral() {
-        return (Integer) get(6);
+        return (Integer) get(8);
     }
 
     /**
      * Setter for <code>thmodel.exchangeinfo.name</code>.
      */
     public void setName(String value) {
-        set(7, value);
+        set(9, value);
     }
 
     /**
      * Getter for <code>thmodel.exchangeinfo.name</code>.
      */
     public String getName() {
-        return (String) get(7);
+        return (String) get(9);
     }
 
     /**
      * Setter for <code>thmodel.exchangeinfo.phone</code>.
      */
     public void setPhone(String value) {
-        set(8, value);
+        set(10, value);
     }
 
     /**
      * Getter for <code>thmodel.exchangeinfo.phone</code>.
      */
     public String getPhone() {
-        return (String) get(8);
+        return (String) get(10);
     }
 
     /**
      * Setter for <code>thmodel.exchangeinfo.address</code>.
      */
     public void setAddress(String value) {
-        set(9, value);
+        set(11, value);
     }
 
     /**
      * Getter for <code>thmodel.exchangeinfo.address</code>.
      */
     public String getAddress() {
-        return (String) get(9);
+        return (String) get(11);
     }
 
     /**
      * Setter for <code>thmodel.exchangeinfo.msg</code>.
      */
     public void setMsg(String value) {
-        set(10, value);
+        set(12, value);
     }
 
     /**
      * Getter for <code>thmodel.exchangeinfo.msg</code>.
      */
     public String getMsg() {
-        return (String) get(10);
+        return (String) get(12);
     }
 
     /**
      * Setter for <code>thmodel.exchangeinfo.logistics</code>.
      */
     public void setLogistics(String value) {
-        set(11, value);
+        set(13, value);
     }
 
     /**
      * Getter for <code>thmodel.exchangeinfo.logistics</code>.
      */
     public String getLogistics() {
-        return (String) get(11);
+        return (String) get(13);
     }
 
     /**
      * Setter for <code>thmodel.exchangeinfo.time</code>.
      */
     public void setTime(Timestamp value) {
-        set(12, value);
+        set(14, value);
     }
 
     /**
      * Getter for <code>thmodel.exchangeinfo.time</code>.
      */
     public Timestamp getTime() {
-        return (Timestamp) get(12);
+        return (Timestamp) get(14);
     }
 
     /**
      * Setter for <code>thmodel.exchangeinfo.shipped</code>.
      */
     public void setShipped(Integer value) {
-        set(13, value);
+        set(15, value);
     }
 
     /**
      * Getter for <code>thmodel.exchangeinfo.shipped</code>.
      */
     public Integer getShipped() {
-        return (Integer) get(13);
+        return (Integer) get(15);
     }
 
     /**
      * Setter for <code>thmodel.exchangeinfo.shippedTime</code>.
      */
     public void setShippedtime(Timestamp value) {
-        set(14, value);
+        set(16, value);
     }
 
     /**
      * Getter for <code>thmodel.exchangeinfo.shippedTime</code>.
      */
     public Timestamp getShippedtime() {
-        return (Timestamp) get(14);
+        return (Timestamp) get(16);
     }
 
     // -------------------------------------------------------------------------
@@ -255,23 +283,23 @@ public class ExchangeinfoRecord extends UpdatableRecordImpl<ExchangeinfoRecord>
     }
 
     // -------------------------------------------------------------------------
-    // Record15 type implementation
+    // Record17 type implementation
     // -------------------------------------------------------------------------
 
     /**
      * {@inheritDoc}
      */
     @Override
-    public Row15<Integer, Integer, Integer, Integer, Integer, Integer, Integer, String, String, String, String, String, Timestamp, Integer, Timestamp> fieldsRow() {
-        return (Row15) super.fieldsRow();
+    public Row17<Integer, Integer, Integer, String, String, Integer, Integer, Integer, Integer, String, String, String, String, String, Timestamp, Integer, Timestamp> fieldsRow() {
+        return (Row17) super.fieldsRow();
     }
 
     /**
      * {@inheritDoc}
      */
     @Override
-    public Row15<Integer, Integer, Integer, Integer, Integer, Integer, Integer, String, String, String, String, String, Timestamp, Integer, Timestamp> valuesRow() {
-        return (Row15) super.valuesRow();
+    public Row17<Integer, Integer, Integer, String, String, Integer, Integer, Integer, Integer, String, String, String, String, String, Timestamp, Integer, Timestamp> valuesRow() {
+        return (Row17) super.valuesRow();
     }
 
     /**
@@ -302,7 +330,23 @@ public class ExchangeinfoRecord extends UpdatableRecordImpl<ExchangeinfoRecord>
      * {@inheritDoc}
      */
     @Override
-    public Field<Integer> field4() {
+    public Field<String> field4() {
+        return Exchangeinfo.EXCHANGEINFO.COVER;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public Field<String> field5() {
+        return Exchangeinfo.EXCHANGEINFO.MERCHANDISENAME;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public Field<Integer> field6() {
         return Exchangeinfo.EXCHANGEINFO.PRICE;
     }
 
@@ -310,7 +354,7 @@ public class ExchangeinfoRecord extends UpdatableRecordImpl<ExchangeinfoRecord>
      * {@inheritDoc}
      */
     @Override
-    public Field<Integer> field5() {
+    public Field<Integer> field7() {
         return Exchangeinfo.EXCHANGEINFO.INTEGRAL;
     }
 
@@ -318,7 +362,7 @@ public class ExchangeinfoRecord extends UpdatableRecordImpl<ExchangeinfoRecord>
      * {@inheritDoc}
      */
     @Override
-    public Field<Integer> field6() {
+    public Field<Integer> field8() {
         return Exchangeinfo.EXCHANGEINFO.AMOUNT;
     }
 
@@ -326,7 +370,7 @@ public class ExchangeinfoRecord extends UpdatableRecordImpl<ExchangeinfoRecord>
      * {@inheritDoc}
      */
     @Override
-    public Field<Integer> field7() {
+    public Field<Integer> field9() {
         return Exchangeinfo.EXCHANGEINFO.TOTALINTEGRAL;
     }
 
@@ -334,7 +378,7 @@ public class ExchangeinfoRecord extends UpdatableRecordImpl<ExchangeinfoRecord>
      * {@inheritDoc}
      */
     @Override
-    public Field<String> field8() {
+    public Field<String> field10() {
         return Exchangeinfo.EXCHANGEINFO.NAME;
     }
 
@@ -342,7 +386,7 @@ public class ExchangeinfoRecord extends UpdatableRecordImpl<ExchangeinfoRecord>
      * {@inheritDoc}
      */
     @Override
-    public Field<String> field9() {
+    public Field<String> field11() {
         return Exchangeinfo.EXCHANGEINFO.PHONE;
     }
 
@@ -350,7 +394,7 @@ public class ExchangeinfoRecord extends UpdatableRecordImpl<ExchangeinfoRecord>
      * {@inheritDoc}
      */
     @Override
-    public Field<String> field10() {
+    public Field<String> field12() {
         return Exchangeinfo.EXCHANGEINFO.ADDRESS;
     }
 
@@ -358,7 +402,7 @@ public class ExchangeinfoRecord extends UpdatableRecordImpl<ExchangeinfoRecord>
      * {@inheritDoc}
      */
     @Override
-    public Field<String> field11() {
+    public Field<String> field13() {
         return Exchangeinfo.EXCHANGEINFO.MSG;
     }
 
@@ -366,7 +410,7 @@ public class ExchangeinfoRecord extends UpdatableRecordImpl<ExchangeinfoRecord>
      * {@inheritDoc}
      */
     @Override
-    public Field<String> field12() {
+    public Field<String> field14() {
         return Exchangeinfo.EXCHANGEINFO.LOGISTICS;
     }
 
@@ -374,7 +418,7 @@ public class ExchangeinfoRecord extends UpdatableRecordImpl<ExchangeinfoRecord>
      * {@inheritDoc}
      */
     @Override
-    public Field<Timestamp> field13() {
+    public Field<Timestamp> field15() {
         return Exchangeinfo.EXCHANGEINFO.TIME;
     }
 
@@ -382,7 +426,7 @@ public class ExchangeinfoRecord extends UpdatableRecordImpl<ExchangeinfoRecord>
      * {@inheritDoc}
      */
     @Override
-    public Field<Integer> field14() {
+    public Field<Integer> field16() {
         return Exchangeinfo.EXCHANGEINFO.SHIPPED;
     }
 
@@ -390,7 +434,7 @@ public class ExchangeinfoRecord extends UpdatableRecordImpl<ExchangeinfoRecord>
      * {@inheritDoc}
      */
     @Override
-    public Field<Timestamp> field15() {
+    public Field<Timestamp> field17() {
         return Exchangeinfo.EXCHANGEINFO.SHIPPEDTIME;
     }
 
@@ -422,7 +466,23 @@ public class ExchangeinfoRecord extends UpdatableRecordImpl<ExchangeinfoRecord>
      * {@inheritDoc}
      */
     @Override
-    public Integer component4() {
+    public String component4() {
+        return getCover();
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public String component5() {
+        return getMerchandisename();
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public Integer component6() {
         return getPrice();
     }
 
@@ -430,7 +490,7 @@ public class ExchangeinfoRecord extends UpdatableRecordImpl<ExchangeinfoRecord>
      * {@inheritDoc}
      */
     @Override
-    public Integer component5() {
+    public Integer component7() {
         return getIntegral();
     }
 
@@ -438,7 +498,7 @@ public class ExchangeinfoRecord extends UpdatableRecordImpl<ExchangeinfoRecord>
      * {@inheritDoc}
      */
     @Override
-    public Integer component6() {
+    public Integer component8() {
         return getAmount();
     }
 
@@ -446,7 +506,7 @@ public class ExchangeinfoRecord extends UpdatableRecordImpl<ExchangeinfoRecord>
      * {@inheritDoc}
      */
     @Override
-    public Integer component7() {
+    public Integer component9() {
         return getTotalintegral();
     }
 
@@ -454,7 +514,7 @@ public class ExchangeinfoRecord extends UpdatableRecordImpl<ExchangeinfoRecord>
      * {@inheritDoc}
      */
     @Override
-    public String component8() {
+    public String component10() {
         return getName();
     }
 
@@ -462,7 +522,7 @@ public class ExchangeinfoRecord extends UpdatableRecordImpl<ExchangeinfoRecord>
      * {@inheritDoc}
      */
     @Override
-    public String component9() {
+    public String component11() {
         return getPhone();
     }
 
@@ -470,7 +530,7 @@ public class ExchangeinfoRecord extends UpdatableRecordImpl<ExchangeinfoRecord>
      * {@inheritDoc}
      */
     @Override
-    public String component10() {
+    public String component12() {
         return getAddress();
     }
 
@@ -478,7 +538,7 @@ public class ExchangeinfoRecord extends UpdatableRecordImpl<ExchangeinfoRecord>
      * {@inheritDoc}
      */
     @Override
-    public String component11() {
+    public String component13() {
         return getMsg();
     }
 
@@ -486,7 +546,7 @@ public class ExchangeinfoRecord extends UpdatableRecordImpl<ExchangeinfoRecord>
      * {@inheritDoc}
      */
     @Override
-    public String component12() {
+    public String component14() {
         return getLogistics();
     }
 
@@ -494,7 +554,7 @@ public class ExchangeinfoRecord extends UpdatableRecordImpl<ExchangeinfoRecord>
      * {@inheritDoc}
      */
     @Override
-    public Timestamp component13() {
+    public Timestamp component15() {
         return getTime();
     }
 
@@ -502,7 +562,7 @@ public class ExchangeinfoRecord extends UpdatableRecordImpl<ExchangeinfoRecord>
      * {@inheritDoc}
      */
     @Override
-    public Integer component14() {
+    public Integer component16() {
         return getShipped();
     }
 
@@ -510,7 +570,7 @@ public class ExchangeinfoRecord extends UpdatableRecordImpl<ExchangeinfoRecord>
      * {@inheritDoc}
      */
     @Override
-    public Timestamp component15() {
+    public Timestamp component17() {
         return getShippedtime();
     }
 
@@ -542,7 +602,23 @@ public class ExchangeinfoRecord extends UpdatableRecordImpl<ExchangeinfoRecord>
      * {@inheritDoc}
      */
     @Override
-    public Integer value4() {
+    public String value4() {
+        return getCover();
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public String value5() {
+        return getMerchandisename();
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public Integer value6() {
         return getPrice();
     }
 
@@ -550,7 +626,7 @@ public class ExchangeinfoRecord extends UpdatableRecordImpl<ExchangeinfoRecord>
      * {@inheritDoc}
      */
     @Override
-    public Integer value5() {
+    public Integer value7() {
         return getIntegral();
     }
 
@@ -558,7 +634,7 @@ public class ExchangeinfoRecord extends UpdatableRecordImpl<ExchangeinfoRecord>
      * {@inheritDoc}
      */
     @Override
-    public Integer value6() {
+    public Integer value8() {
         return getAmount();
     }
 
@@ -566,7 +642,7 @@ public class ExchangeinfoRecord extends UpdatableRecordImpl<ExchangeinfoRecord>
      * {@inheritDoc}
      */
     @Override
-    public Integer value7() {
+    public Integer value9() {
         return getTotalintegral();
     }
 
@@ -574,7 +650,7 @@ public class ExchangeinfoRecord extends UpdatableRecordImpl<ExchangeinfoRecord>
      * {@inheritDoc}
      */
     @Override
-    public String value8() {
+    public String value10() {
         return getName();
     }
 
@@ -582,7 +658,7 @@ public class ExchangeinfoRecord extends UpdatableRecordImpl<ExchangeinfoRecord>
      * {@inheritDoc}
      */
     @Override
-    public String value9() {
+    public String value11() {
         return getPhone();
     }
 
@@ -590,7 +666,7 @@ public class ExchangeinfoRecord extends UpdatableRecordImpl<ExchangeinfoRecord>
      * {@inheritDoc}
      */
     @Override
-    public String value10() {
+    public String value12() {
         return getAddress();
     }
 
@@ -598,7 +674,7 @@ public class ExchangeinfoRecord extends UpdatableRecordImpl<ExchangeinfoRecord>
      * {@inheritDoc}
      */
     @Override
-    public String value11() {
+    public String value13() {
         return getMsg();
     }
 
@@ -606,7 +682,7 @@ public class ExchangeinfoRecord extends UpdatableRecordImpl<ExchangeinfoRecord>
      * {@inheritDoc}
      */
     @Override
-    public String value12() {
+    public String value14() {
         return getLogistics();
     }
 
@@ -614,7 +690,7 @@ public class ExchangeinfoRecord extends UpdatableRecordImpl<ExchangeinfoRecord>
      * {@inheritDoc}
      */
     @Override
-    public Timestamp value13() {
+    public Timestamp value15() {
         return getTime();
     }
 
@@ -622,7 +698,7 @@ public class ExchangeinfoRecord extends UpdatableRecordImpl<ExchangeinfoRecord>
      * {@inheritDoc}
      */
     @Override
-    public Integer value14() {
+    public Integer value16() {
         return getShipped();
     }
 
@@ -630,7 +706,7 @@ public class ExchangeinfoRecord extends UpdatableRecordImpl<ExchangeinfoRecord>
      * {@inheritDoc}
      */
     @Override
-    public Timestamp value15() {
+    public Timestamp value17() {
         return getShippedtime();
     }
 
@@ -665,7 +741,25 @@ public class ExchangeinfoRecord extends UpdatableRecordImpl<ExchangeinfoRecord>
      * {@inheritDoc}
      */
     @Override
-    public ExchangeinfoRecord value4(Integer value) {
+    public ExchangeinfoRecord value4(String value) {
+        setCover(value);
+        return this;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public ExchangeinfoRecord value5(String value) {
+        setMerchandisename(value);
+        return this;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public ExchangeinfoRecord value6(Integer value) {
         setPrice(value);
         return this;
     }
@@ -674,7 +768,7 @@ public class ExchangeinfoRecord extends UpdatableRecordImpl<ExchangeinfoRecord>
      * {@inheritDoc}
      */
     @Override
-    public ExchangeinfoRecord value5(Integer value) {
+    public ExchangeinfoRecord value7(Integer value) {
         setIntegral(value);
         return this;
     }
@@ -683,7 +777,7 @@ public class ExchangeinfoRecord extends UpdatableRecordImpl<ExchangeinfoRecord>
      * {@inheritDoc}
      */
     @Override
-    public ExchangeinfoRecord value6(Integer value) {
+    public ExchangeinfoRecord value8(Integer value) {
         setAmount(value);
         return this;
     }
@@ -692,7 +786,7 @@ public class ExchangeinfoRecord extends UpdatableRecordImpl<ExchangeinfoRecord>
      * {@inheritDoc}
      */
     @Override
-    public ExchangeinfoRecord value7(Integer value) {
+    public ExchangeinfoRecord value9(Integer value) {
         setTotalintegral(value);
         return this;
     }
@@ -701,7 +795,7 @@ public class ExchangeinfoRecord extends UpdatableRecordImpl<ExchangeinfoRecord>
      * {@inheritDoc}
      */
     @Override
-    public ExchangeinfoRecord value8(String value) {
+    public ExchangeinfoRecord value10(String value) {
         setName(value);
         return this;
     }
@@ -710,7 +804,7 @@ public class ExchangeinfoRecord extends UpdatableRecordImpl<ExchangeinfoRecord>
      * {@inheritDoc}
      */
     @Override
-    public ExchangeinfoRecord value9(String value) {
+    public ExchangeinfoRecord value11(String value) {
         setPhone(value);
         return this;
     }
@@ -719,7 +813,7 @@ public class ExchangeinfoRecord extends UpdatableRecordImpl<ExchangeinfoRecord>
      * {@inheritDoc}
      */
     @Override
-    public ExchangeinfoRecord value10(String value) {
+    public ExchangeinfoRecord value12(String value) {
         setAddress(value);
         return this;
     }
@@ -728,7 +822,7 @@ public class ExchangeinfoRecord extends UpdatableRecordImpl<ExchangeinfoRecord>
      * {@inheritDoc}
      */
     @Override
-    public ExchangeinfoRecord value11(String value) {
+    public ExchangeinfoRecord value13(String value) {
         setMsg(value);
         return this;
     }
@@ -737,7 +831,7 @@ public class ExchangeinfoRecord extends UpdatableRecordImpl<ExchangeinfoRecord>
      * {@inheritDoc}
      */
     @Override
-    public ExchangeinfoRecord value12(String value) {
+    public ExchangeinfoRecord value14(String value) {
         setLogistics(value);
         return this;
     }
@@ -746,7 +840,7 @@ public class ExchangeinfoRecord extends UpdatableRecordImpl<ExchangeinfoRecord>
      * {@inheritDoc}
      */
     @Override
-    public ExchangeinfoRecord value13(Timestamp value) {
+    public ExchangeinfoRecord value15(Timestamp value) {
         setTime(value);
         return this;
     }
@@ -755,7 +849,7 @@ public class ExchangeinfoRecord extends UpdatableRecordImpl<ExchangeinfoRecord>
      * {@inheritDoc}
      */
     @Override
-    public ExchangeinfoRecord value14(Integer value) {
+    public ExchangeinfoRecord value16(Integer value) {
         setShipped(value);
         return this;
     }
@@ -764,7 +858,7 @@ public class ExchangeinfoRecord extends UpdatableRecordImpl<ExchangeinfoRecord>
      * {@inheritDoc}
      */
     @Override
-    public ExchangeinfoRecord value15(Timestamp value) {
+    public ExchangeinfoRecord value17(Timestamp value) {
         setShippedtime(value);
         return this;
     }
@@ -773,7 +867,7 @@ public class ExchangeinfoRecord extends UpdatableRecordImpl<ExchangeinfoRecord>
      * {@inheritDoc}
      */
     @Override
-    public ExchangeinfoRecord values(Integer value1, Integer value2, Integer value3, Integer value4, Integer value5, Integer value6, Integer value7, String value8, String value9, String value10, String value11, String value12, Timestamp value13, Integer value14, Timestamp value15) {
+    public ExchangeinfoRecord values(Integer value1, Integer value2, Integer value3, String value4, String value5, Integer value6, Integer value7, Integer value8, Integer value9, String value10, String value11, String value12, String value13, String value14, Timestamp value15, Integer value16, Timestamp value17) {
         value1(value1);
         value2(value2);
         value3(value3);
@@ -789,6 +883,8 @@ public class ExchangeinfoRecord extends UpdatableRecordImpl<ExchangeinfoRecord>
         value13(value13);
         value14(value14);
         value15(value15);
+        value16(value16);
+        value17(value17);
         return this;
     }
 
@@ -806,23 +902,25 @@ public class ExchangeinfoRecord extends UpdatableRecordImpl<ExchangeinfoRecord>
     /**
      * Create a detached, initialised ExchangeinfoRecord
      */
-    public ExchangeinfoRecord(Integer id, Integer memberpk, Integer merchandiseid, Integer price, Integer integral, Integer amount, Integer totalintegral, String name, String phone, String address, String msg, String logistics, Timestamp time, Integer shipped, Timestamp shippedtime) {
+    public ExchangeinfoRecord(Integer id, Integer memberpk, Integer merchandiseid, String cover, String merchandisename, Integer price, Integer integral, Integer amount, Integer totalintegral, String name, String phone, String address, String msg, String logistics, Timestamp time, Integer shipped, Timestamp shippedtime) {
         super(Exchangeinfo.EXCHANGEINFO);
 
         set(0, id);
         set(1, memberpk);
         set(2, merchandiseid);
-        set(3, price);
-        set(4, integral);
-        set(5, amount);
-        set(6, totalintegral);
-        set(7, name);
-        set(8, phone);
-        set(9, address);
-        set(10, msg);
-        set(11, logistics);
-        set(12, time);
-        set(13, shipped);
-        set(14, shippedtime);
+        set(3, cover);
+        set(4, merchandisename);
+        set(5, price);
+        set(6, integral);
+        set(7, amount);
+        set(8, totalintegral);
+        set(9, name);
+        set(10, phone);
+        set(11, address);
+        set(12, msg);
+        set(13, logistics);
+        set(14, time);
+        set(15, shipped);
+        set(16, shippedtime);
     }
 }

+ 17 - 2
src/main/java/com/thmodel/jooq/tables/records/MemberinfoRecord.java

@@ -28,7 +28,7 @@ import org.jooq.impl.UpdatableRecordImpl;
 @SuppressWarnings({ "all", "unchecked", "rawtypes" })
 public class MemberinfoRecord extends UpdatableRecordImpl<MemberinfoRecord> {
 
-    private static final long serialVersionUID = -1351004201;
+    private static final long serialVersionUID = 1986155348;
 
     /**
      * Setter for <code>thmodel.memberinfo.PK</code>.
@@ -828,6 +828,20 @@ public class MemberinfoRecord extends UpdatableRecordImpl<MemberinfoRecord> {
         return (String) get(56);
     }
 
+    /**
+     * Setter for <code>thmodel.memberinfo.integral</code>.
+     */
+    public void setIntegral(Integer value) {
+        set(57, value);
+    }
+
+    /**
+     * Getter for <code>thmodel.memberinfo.integral</code>.
+     */
+    public Integer getIntegral() {
+        return (Integer) get(57);
+    }
+
     // -------------------------------------------------------------------------
     // Primary key information
     // -------------------------------------------------------------------------
@@ -854,7 +868,7 @@ public class MemberinfoRecord extends UpdatableRecordImpl<MemberinfoRecord> {
     /**
      * Create a detached, initialised MemberinfoRecord
      */
-    public MemberinfoRecord(Integer pk, Integer membtype, Integer membclass, String qrcode, String tel, String pass, String paypass, String pet, String hphoto, String photo, Integer area, String age, String id, Integer islive, Timestamp mdate, String token, Integer acc, Timestamp lastsign, Integer signdays, Integer introducerpk, String identify, String idA, String idB, String idC, String wid, BigDecimal coinA, BigDecimal coinIr, BigDecimal coinIv, BigDecimal coinIs, BigDecimal coinIrr, BigDecimal coinIvv, BigDecimal coinIss, BigDecimal coinIll, BigDecimal coinI, BigDecimal coinOr, BigDecimal coinOv, BigDecimal coinOs, BigDecimal coinOm, BigDecimal coinO, BigDecimal coinOi, BigDecimal coinOp, String phone, BigDecimal coinIrrr, BigDecimal coinIrrrm, BigDecimal incomeRatioGift, BigDecimal incomeRatioVideo, BigDecimal incomeRatioService, BigDecimal shareRatioGift, BigDecimal shareRatioVideo, BigDecimal shareRatioService, BigDecimal brokerRatioGift, BigDecimal brokerRatioVideo, BigDecimal brokerRatioService, BigDecimal coinShare, Integer canChat, String ip, String uuid) {
+    public MemberinfoRecord(Integer pk, Integer membtype, Integer membclass, String qrcode, String tel, String pass, String paypass, String pet, String hphoto, String photo, Integer area, String age, String id, Integer islive, Timestamp mdate, String token, Integer acc, Timestamp lastsign, Integer signdays, Integer introducerpk, String identify, String idA, String idB, String idC, String wid, BigDecimal coinA, BigDecimal coinIr, BigDecimal coinIv, BigDecimal coinIs, BigDecimal coinIrr, BigDecimal coinIvv, BigDecimal coinIss, BigDecimal coinIll, BigDecimal coinI, BigDecimal coinOr, BigDecimal coinOv, BigDecimal coinOs, BigDecimal coinOm, BigDecimal coinO, BigDecimal coinOi, BigDecimal coinOp, String phone, BigDecimal coinIrrr, BigDecimal coinIrrrm, BigDecimal incomeRatioGift, BigDecimal incomeRatioVideo, BigDecimal incomeRatioService, BigDecimal shareRatioGift, BigDecimal shareRatioVideo, BigDecimal shareRatioService, BigDecimal brokerRatioGift, BigDecimal brokerRatioVideo, BigDecimal brokerRatioService, BigDecimal coinShare, Integer canChat, String ip, String uuid, Integer integral) {
         super(Memberinfo.MEMBERINFO);
 
         set(0, pk);
@@ -914,5 +928,6 @@ public class MemberinfoRecord extends UpdatableRecordImpl<MemberinfoRecord> {
         set(54, canChat);
         set(55, ip);
         set(56, uuid);
+        set(57, integral);
     }
 }

+ 1 - 2
src/main/java/com/thmodel/service/IntegralService.java

@@ -2,7 +2,6 @@ package com.thmodel.service;
 
 import com.thmodel.entity.ExchangeInfo;
 import com.thmodel.entity.MerchandiseInfo;
-import com.thmodel.jooq.tables.records.ExchangeinfoRecord;
 import net.sf.json.JSONObject;
 
 import java.util.List;
@@ -16,5 +15,5 @@ public interface IntegralService {
 
     List<JSONObject> getAllExchangeInfo(ExchangeInfo record);
 
-    boolean saveExchange(ExchangeinfoRecord record);
+    boolean saveExchange(ExchangeInfo record);
 }

+ 47 - 4
src/main/java/com/thmodel/service/impl/IntegralServiceImpl.java

@@ -1,17 +1,21 @@
 package com.thmodel.service.impl;
 
 import com.thmodel.dao.IntegralDao;
+import com.thmodel.dao.MemberinfoDao;
 import com.thmodel.dao.impl.IntegralDaoImpl;
+import com.thmodel.dao.impl.MemberinfoDaoImpl;
 import com.thmodel.entity.ExchangeInfo;
 import com.thmodel.entity.MerchandiseInfo;
-import com.thmodel.jooq.tables.records.ExchangeinfoRecord;
+import com.thmodel.jooq.tables.records.MemberinfoRecord;
+import com.thmodel.jooq.tables.records.MerchandiseinfoRecord;
 import com.thmodel.service.IntegralService;
 import net.sf.json.JSONObject;
 
 import java.util.List;
 
 public class IntegralServiceImpl implements IntegralService {
-    private static IntegralDao integralDao = new IntegralDaoImpl();
+    private static IntegralDao   integralDao   = new IntegralDaoImpl();
+    private static MemberinfoDao memberinfoDao = new MemberinfoDaoImpl();
 
     @Override
     public List<JSONObject> getMerchandisesByPage(MerchandiseInfo record, int page) {
@@ -34,7 +38,46 @@ public class IntegralServiceImpl implements IntegralService {
     }
 
     @Override
-    public boolean saveExchange(ExchangeinfoRecord record) {
-        return integralDao.saveExchangeInfo(record) > 0;
+    public boolean saveExchange(ExchangeInfo record) {
+        try {
+            if (record.getMerchandiseId() == null
+                    || record.getMemberPK() == null
+                    || record.getName() == null
+                    || record.getPhone() == null
+                    || record.getAddress() == null
+                    || !(record.getAmount() != null && record.getAmount() > 0)) {
+                throw new RuntimeException("参数错误");
+            }
+            MerchandiseInfo merchandiseInfo = integralDao.queryMerchandiseInfo(record.getMerchandiseId());
+            int balance = memberinfoDao.findMemberinfoByPK(record.getMemberPK()).getIntegral();
+            int totalIntegral = merchandiseInfo.getIntegral() * record.getAmount();
+            if (balance < totalIntegral) {
+                throw new RuntimeException("积分不足");
+            }
+            if (merchandiseInfo.getStock() < record.getAmount()) {
+                throw new RuntimeException("库存不足");
+            }
+            MemberinfoRecord memberinfoRecord = new MemberinfoRecord();
+            memberinfoRecord.setPk(record.getMemberPK());
+            memberinfoRecord.setIntegral(balance - totalIntegral);
+            int num = memberinfoDao.updateMemberInfo(memberinfoRecord);
+            if (num <= 0) {
+                throw new RuntimeException("未知错误");
+            }
+            MerchandiseinfoRecord merchandiseinfoRecord = new MerchandiseinfoRecord();
+            merchandiseinfoRecord.setId(merchandiseInfo.getId());
+            merchandiseinfoRecord.setStock(merchandiseInfo.getStock() - record.getAmount());
+            integralDao.updateMerchandiseInfo(merchandiseinfoRecord);
+            record.setIntegral(merchandiseInfo.getIntegral());
+            record.setPrice(merchandiseInfo.getPrice());
+            record.setMerchandiseName(merchandiseInfo.getName());
+            record.setTotalIntegral(totalIntegral);
+            record.setCover(merchandiseInfo.getCover());
+            record.setMerchandiseName(merchandiseInfo.getName());
+            return integralDao.saveExchangeInfo(record) > 0;
+        } catch (NullPointerException e) {
+            e.printStackTrace();
+        }
+        return false;
     }
 }

+ 2 - 3
src/main/java/com/thmodel/servlet/IntegralServlet.java

@@ -2,10 +2,9 @@ package com.thmodel.servlet;
 
 import com.thmodel.entity.ExchangeInfo;
 import com.thmodel.entity.MerchandiseInfo;
-import com.thmodel.jooq.tables.records.ExchangeinfoRecord;
 import com.thmodel.service.IntegralService;
-import com.thmodel.service.ServiceException;
 import com.thmodel.service.impl.IntegralServiceImpl;
+import com.thmodel.util.CommentUtils;
 import com.thmodel.util.JspUtils;
 import net.sf.json.JSONObject;
 import org.apache.commons.beanutils.BeanUtils;
@@ -61,7 +60,7 @@ public class IntegralServlet extends HttpServlet {
                 resultJson.put("data", data);
                 resultJson.put("success", true);
             } else if ("saveExchange".equals(action)) {
-                ExchangeinfoRecord exchangeInfo = new ExchangeinfoRecord();
+                ExchangeInfo exchangeInfo = new ExchangeInfo();
                 BeanUtils.populate(exchangeInfo, request.getParameterMap());
                 boolean success = integralService.saveExchange(exchangeInfo);
                 resultJson.put("success", success);